#include "mkfifo.h"

int main(int argc, char const *argv[])
{
	signal(SIGINT,fun);
	int ret=0;
	int fd =0;
	fd = create_open_fifo(FIFONAME,O_WRONLY);//只写方式打开会阻塞，所以要在其之前安装信号
	char buf[100]={0};
	while(1){
		bzero(buf, sizeof(buf));
		scanf("%s",buf);
		write(fd,buf,sizeof(buf));

	}
	return 0;
}


